import axios from '@/api/fetch';
import SERVER from '@/api/server';

// 质保提醒查询
export const getGuaranteedRemindTable = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/guaranteedRemind/queryRemind`, { params });
// 查询车辆
export const getOwnerVehicle = ownerNo => axios.get(`${SERVER.DMSCLOUD_REPAIR}/guaranteedRemind/getOwnerVehicle/${ownerNo}`, { });
// 保存
export const saveRemind = params => axios.post(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/customer/guaranteed/careSave`, params);
// 已关怀
export const queryCared = params => axios.get(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/customer/guaranteed/queryCared`, { params });
// 再次关怀
export const queryCaringAgain = params => axios.get(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/customer/guaranteed/queryCaringAgain`, { params });
// 获取维修建议备件
export const getAdvicePart = params => axios.get(`${SERVER.DMSCLOUD_CUSTOMER}/customer/adviceQuery/part`, { params });
// 导出维修建议项目
export const exportLabour = params => axios.get(`${SERVER.DMSCLOUD_CUSTOMER}/customer/adviceQuery/export`, params);
// 到处维修建议备件
export const exportPart = params => axios.get(`${SERVER.DMSCLOUD_CUSTOMER}/customer/adviceQuery/export`, params);
// 获取经销商
export const getDealerCode = params => axios.get(`${SERVER.DMSCLOUD_CUSTOMER}/customer/adviceQuery/DealerCode`, { params });
// 获取品牌
export const getbrandsdictList = params => axios.get(`${SERVER.DMS_WEB}/manage/rest/basedata/brandsdict`, { params });
// 获取车系
export const getselectSeriesList = params => axios.get(`${SERVER.DMS_WEB}/manage/rest/basedata/selectSeries`, { params });
// 获取车型
export const getselectModelList = params => axios.get(`${SERVER.DMS_WEB}/manage/rest/basedata/selectModel`, { params });
// 获取部门
export const getMaintainAdvisorList = params => axios.get(`${SERVER.DMS_WEB}/customer/rest/customer/solicitude/MaintainAdvisor`, { params });
// 获取保险
export const getinsuranceTypeNameList = params => axios.get(`${SERVER.DMS_WEB}/customer/rest/customer/insurance/insuranceTypeName`, { params });
// 获取保险月
export const getinsuranceMonthkyList = params => axios.get(`${SERVER.DMS_WEB}/customer/rest/customer/insurance/insuranceMonthky`, { params });
// 获取保险日
export const getinsuranceDaykyList = params => axios.get(`${SERVER.DMS_WEB}/customer/rest/customer/insurance/insuranceDayky`, { params });

// 保险信息查询
export const getinsuranceList = params => axios.get(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/customer/insuranceRemind`, { params });
// 品牌 - 下拉框
export const getPinpSelect = params => axios.get(`/api/basedata/vehicleProduct/brandsqueryall`, { params });
// 服务顾问 - 下拉框
export const getUserListSelect = params => axios.get(`/api/sysManage/basedata/users/getUserListByRole?role=10071011`, { params });

// 提醒录入保存
export const addRemind = params => axios.post(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/customer/remindContent/addRemind`, params);

//  问卷查询
export const questionPag = params => axios.get(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/customerManage/questionnaire/record`, { params });

// 问卷录入保存
export const addQuestion = params => axios.post(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/customer/remindContent/addQuestion`, params);

// 质保提醒回访导出
export const YBexport1 = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/guaranteedRemind/export/excal`, { params, responseType: 'arraybuffer' });

// 质保提醒回访导出
export const YBexport2 = params => axios.get(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/customer/guaranteed/queryCared/export/excal`, { params, responseType: 'arraybuffer' });

// 质保提醒回访导出
export const YBexport3 = params => axios.get(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/customer/guaranteed/queryCaringAgain/export/excal`, { params, responseType: 'arraybuffer' });
